package cn.liyicun.cp.cpweb.controller.admin;

import cn.liyicun.cp.cpweb.base.Result;
import cn.liyicun.cp.cpweb.service.ExpectInfoService;
import cn.liyicun.cp.cpweb.util.CPConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping(value = {CPConstant.ROOT_PHONE_ADMIN + "/expect"})
public class ExpectAdminController extends BaseAdminController {
    @Autowired
    ExpectInfoService expectInfoService;


    @RequestMapping(value = "/addExpectInfo")
    @ResponseBody
    public Result<?> moneyStatus(HttpServletRequest request,
                                 @RequestParam(value = "code", required = true) String code) {
        getLoginById(request);
        expectInfoService.task(code);
        return Result.success("操作成功!");
    }



}
